package cn.sdormitory.controller;

import cn.sdormitory.common.api.CommonResult;
import cn.sdormitory.sys.entity.SysConfig;
import cn.sdormitory.sys.service.SysConfigService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author: lx
 * @date: 2023/10/12 14:14
 * @description:
 */
@RestController
@Api(tags = "app-sys-config => 系统配置信息")
@RequestMapping("/app/sys/config")
public class AppConfigController {

    @Resource
    SysConfigService sysConfigService;

    @PostMapping(value = "/getSysConfigByKey")
    public CommonResult getSysConfigByKey(@RequestBody SysConfig config){
        return CommonResult.success(sysConfigService.getSysConfigByKey(config));
    }
}
